<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <script type="text/javascript">
        /*var json = {"firstName": "Brett", "lastName": "McLaughlin"};
        alert(json.firstName+","+json.lastName)*/
        var json = {
            "people":[
                {
                    "firstName": "Brett",
                    "lastName":"McLaughlin"
                },
                {
                    "firstName":"Jason",
                    "lastName":"Hunter"
                }
            ]
        };
        var people = json.people;
        for(var i in people){
            alert(people[i].firstName + "," + people[i].lastName);
        }
        var people = json.people;
        for (var i in people) {
            alert(people[i].firstName+","+people[i].lastName);
        }
    </script>
</head>
<body>

</body>
</html>
